package com.lagou.client;

import com.lagou.service.UserService;
import com.lagou.util.JsonMsg;

public class ClientBootStrap {

    public static final String providerName = "UserService#sayHello#";

    public static void main(String[] args) throws InterruptedException {
        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class, providerName);
        JsonMsg jsonMsg = new JsonMsg();
        jsonMsg.setId(1);
        jsonMsg.setContent(providerName);
        while (true) {
            Thread.sleep(2000);
            System.out.println(proxy.sayHello2(jsonMsg));
        }


    }


}
